Skip to content

Yash/participant dash frontend#72

Merged
YashK2005 merged 24 commits intomainfrom
yash/participant-dash-frontend
Nov 13, 2025
Merged

Yash/participant dash frontend#72
YashK2005 merged 24 commits intomainfrom
yash/participant-dash-frontend

Conversation

@YashK2005
Copy link
Collaborator

@YashK2005 YashK2005 commented Nov 12, 2025

Participant Dashboard Frontend

Overview

This PR implements a comprehensive participant dashboard that allows participants to view their volunteer matches, manage match statuses, and request new volunteers. It includes both frontend UI components and backend API endpoints to support the full match management workflow.

Features

Frontend

  • Participant Dashboard (/participant/dashboard)

    • Landing page with sidebar navigation (Matches, Contact tabs)
    • Dynamic header messages based on match state
    • User avatar display in header
  • Match Display Components

    • VolunteerCard: Displays pending matches with volunteer details (name, pronouns, age, timezone, diagnosis, overview, treatments, experiences)
    • ConfirmedMatchCard: Displays confirmed/scheduled matches with timeline layout (date badge, time, vertical teal bar, volunteer info)
    • Both cards show volunteer overview from volunteer_data table
  • Request New Matches Flow

    • Inline form when all matches are completed (no card border, heading in header area)
    • Modal flow for requesting new matches from pending matches
    • Success confirmation modal after submission
    • Form includes optional message/notes field
  • Date/Time Utilities

    • formatDateRelative(): "Today", "Tomorrow", or day of week
    • formatDateShort(): "Feb 26" format
    • formatTime(): "12:00PM" format

Backend

  • Match Management APIs

    • GET /matches/me: Get all matches for current participant with volunteer details
    • POST /matches/request-new-volunteers: Request new volunteers (soft-deletes active matches, creates task, sets pending flag)
    • POST /matches/{match_id}/schedule: Schedule a match (participant selects time)
    • POST /matches/{match_id}/cancel-participant: Cancel match as participant
    • POST /matches/{match_id}/cancel-volunteer: Cancel match as volunteer
    • POST /matches/{match_id}/request-new-times: Request new time options
    • POST /matches/{match_id}/accept: Volunteer accepts a match
  • Match Service Enhancements

    • Soft deletion support (deleted_at column)
    • Match status management with cleanup logic
    • Volunteer summary includes timezone and overview from user_data and volunteer_data tables
    • Prevents double-booking volunteers
    • Handles match state transitions (pending → confirmed → completed)
  • Database Changes

    • Added deleted_at column to matches table (soft deletion)
    • Added pending_volunteer_request boolean field to users table
    • Added description column to tasks table
  • Time Block Validation

    • Updated TimeRange to accept half-hour boundaries
    • All time slots must start at 0 or 30 minutes, be 30 minutes in length

Database Migrations

  • d87b1000d48b: Add soft deletion to matches table
  • 14fdeccc883f: Add pending_volunteer_request field to users table
  • e3f0a5b4b7c4: Add task description column

TODOs

  • Schedule flow not yet implemented (placeholder handler)
  • Cancel call flow not yet implemented (placeholder handler)
  • View contact details flow not yet implemented (placeholder handler)
  • Contact tab shows placeholder message
  • Mobile styling
  • Edit profile pages not yet implemented

…hes; add request new matches API for participants that creates a new Matching task
…so that all time slots but start at the 0 or 30, and be 30 minutes in length
- Matches default to awaiting_volunteer_acceptance status
- Volunteers must accept matches before participants can see them
- Add GET /matches/volunteer/me and POST /matches/{id}/accept-volunteer endpoints
- Validate volunteers have availability before accepting matches
- Add pending_volunteer_request field to track participant requests
…equest new volunteers flow is done. todo: handle other cases for landing page like when a match is confirmed and call is pending or when a call is completed. also the scheduling, request new time flows + the contact page + styling for mobile
…ed match + updated volunteer card styling for these cases and fetching the user summary from the volunteer_data table
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +515 to +519
# Attach volunteer's general availability as suggested times
self._attach_initial_suggested_times(match, volunteer)

# Transition status to "pending" so participant can see it
self._set_match_status(match, "pending")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Clear pending request flag when volunteer accepts match

When a volunteer accepts a match the service transitions the match to pending but never resets match.participant.pending_volunteer_request. That flag is set to True when a participant requests new volunteers and the dashboard hides all match content while it remains set. As a result, participants continue to see “request pending” even after volunteers accept and suggested times are generated. The acceptance flow should unset the pending flag so newly available matches become visible.

Useful? React with 👍 / 👎.

@YashK2005 YashK2005 merged commit 60c45cf into main Nov 13, 2025
5 checks passed
@YashK2005 YashK2005 deleted the yash/participant-dash-frontend branch November 13, 2025 18:58
UmairHundekar pushed a commit that referenced this pull request Nov 25, 2025
# Participant Dashboard Frontend

## Overview
This PR implements a comprehensive participant dashboard that allows
participants to view their volunteer matches, manage match statuses, and
request new volunteers. It includes both frontend UI components and
backend API endpoints to support the full match management workflow.

## Features

### Frontend
- **Participant Dashboard** (`/participant/dashboard`)
  - Landing page with sidebar navigation (Matches, Contact tabs)
  - Dynamic header messages based on match state
  - User avatar display in header

- **Match Display Components**
- `VolunteerCard`: Displays pending matches with volunteer details
(name, pronouns, age, timezone, diagnosis, overview, treatments,
experiences)
- `ConfirmedMatchCard`: Displays confirmed/scheduled matches with
timeline layout (date badge, time, vertical teal bar, volunteer info)
  - Both cards show volunteer overview from `volunteer_data` table

- **Request New Matches Flow**
- Inline form when all matches are completed (no card border, heading in
header area)
  - Modal flow for requesting new matches from pending matches
  - Success confirmation modal after submission
  - Form includes optional message/notes field

- **Date/Time Utilities**
  - `formatDateRelative()`: "Today", "Tomorrow", or day of week
  - `formatDateShort()`: "Feb 26" format
  - `formatTime()`: "12:00PM" format

### Backend
- **Match Management APIs**
- `GET /matches/me`: Get all matches for current participant with
volunteer details
- `POST /matches/request-new-volunteers`: Request new volunteers
(soft-deletes active matches, creates task, sets pending flag)
- `POST /matches/{match_id}/schedule`: Schedule a match (participant
selects time)
- `POST /matches/{match_id}/cancel-participant`: Cancel match as
participant
- `POST /matches/{match_id}/cancel-volunteer`: Cancel match as volunteer
- `POST /matches/{match_id}/request-new-times`: Request new time options
  - `POST /matches/{match_id}/accept`: Volunteer accepts a match

- **Match Service Enhancements**
  - Soft deletion support (`deleted_at` column)
  - Match status management with cleanup logic
- Volunteer summary includes timezone and overview from `user_data` and
`volunteer_data` tables
  - Prevents double-booking volunteers
  - Handles match state transitions (pending → confirmed → completed)

- **Database Changes**
  - Added `deleted_at` column to `matches` table (soft deletion)
  - Added `pending_volunteer_request` boolean field to `users` table
  - Added `description` column to `tasks` table

- **Time Block Validation**
  - Updated `TimeRange` to accept half-hour boundaries
- All time slots must start at 0 or 30 minutes, be 30 minutes in length

## Database Migrations
- `d87b1000d48b`: Add soft deletion to matches table
- `14fdeccc883f`: Add pending_volunteer_request field to users table
- `e3f0a5b4b7c4`: Add task description column

## TODOs
- Schedule flow not yet implemented (placeholder handler)
- Cancel call flow not yet implemented (placeholder handler)
- View contact details flow not yet implemented (placeholder handler)
- Contact tab shows placeholder message
- Mobile styling 
- Edit profile pages not yet implemented
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant